package com.sale.system.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sale.common.mybatis.core.mapper.BaseMapperPlus;
import com.sale.system.domain.PullDown;
import com.sale.system.domain.SysOrderSupplier;
import com.sale.system.domain.dto.SysOrderSupplierDto;
import com.sale.system.domain.vo.SysOrderSupplierVo;
import com.sale.system.export.SysOrderSupplierManagementExport;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 供应商mapper
 */
@Mapper
public interface SysOrderSupplierMapper extends BaseMapperPlus<SysOrderSupplierMapper, SysOrderSupplier, SysOrderSupplier> {

    /**
     * 供应商管理列表
     */
    Page<SysOrderSupplierDto> getAllList(@Param("page") Page<SysOrderSupplierVo> page, @Param("sysOrderSupplierVo") SysOrderSupplierVo sysOrderSupplierVo);

    /**
     * 查询供应商编号
     */
    List<SysOrderSupplierDto> getSupplierNumMax();

    /**
     * 供应商数据导出
     */
    List<SysOrderSupplierManagementExport> getExportList(SysOrderSupplierVo orderSupplierManagementVo);

    /**
     * 通过多个id获取数据
     */
    List<SysOrderSupplierManagementExport> getDataByIdStr(@Param("idList") List<String> idList);

    /**
     * 获取去启用状态供应商
     */
    List<SysOrderSupplierDto> getOpenSupplierList();

    /**
     * 通过单个id获取数据
     */
    SysOrderSupplierDto getSupplierById(Long id);



    /**
     * 根据编码获取供应商信息
     */
    SysOrderSupplierDto selectByCode(String code);

    /**
     * 通过供应商名称获取供应商编码(财务模块使用)
     */
    String getCodeBySupplierName(String supplierName);

    /**
     * 供应商下拉
     */
    List<PullDown> supplierPullDown();

    /**
     * 更新供应商余额(财务模块使用)
     */
    //boolean updateSupplierBalance(CustomerBalance customer);
}
